var Logger = {
   log: function(msg) {
      if (!this.log_console) {
         var csClass = Components.classes['@mozilla.org/consoleservice;1'];
         this.log_console = csClass.getService(Components.interfaces.nsIConsoleService);
      }

      if (YAHOO.MoodMill.Preference.getBool("extensions.moodmill.enable.debug", true))
         this.log_console.logStringMessage(msg);
   }
}